

package com.xtsoft.platform.base.system.domain;

/*
*    涓婃捣淇℃嫇淇℃伅鎶�鏈湁闄愬叕鍙�  
*    Copyright (C) ShangHai XinTuo Software Inc.
*/

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xtsoft.core.entity.GenericEntity;
import jakarta.persistence.*;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.GenericGenerator;


import java.util.ArrayList;
import java.util.List;

/**
 * SysDashboard Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 * TODO: add class/table comments
 */
@Entity
@Table(name = "sys_dashboard")
@Data
public class SysDashboard extends GenericEntity {


	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="dashboardId",nullable=false,length=32)
    private String dashboardId;


	/**
	*   名称
	*/
		@Column(name="name",nullable=true, length=32 )
	private String name;


	/**
	*   xtype
	*/
		@Column(name="xtype",nullable=true, length=32 )
	private String xtype;


	/**
	*   userCls
	*/
		@Column(name="userCls",nullable=true, length=32 )
	private String userCls;
		
	
		@Column(name="sort",nullable=true, length=32 )
	private Integer sort;


	/**
	*   descript
	*/
		@Column(name="descript",nullable=true, length=255 )
	private String descript;


		@OneToMany(cascade={CascadeType.ALL},                                                        
	            fetch = FetchType.LAZY,mappedBy = "sysDashboard")
		@JsonIgnore
		private List<DashboardRole> dashboardRoles = new ArrayList();

	

	/**
	*  榛樿鏋勯��
	*/
	public SysDashboard(){
	
	}

	/**
	*  鏋勯�犳柟娉曪紝鑷姩娴嬭瘯浣跨敤锛屾妸闄や富閿鐨勬墍鏈夐潪绌哄瓧娈佃祴鍊�
	*
	*  涔熷彲浣滄櫘閫氫娇鐢�  璋冪敤璇ユ瀯閫犳柟娉曟椂锛屽瓧涓插弬鏁板～鎴栦笉濉潎
	*  鍙紝璇ュ甫鍙傛瀯閫犳柟娉曚粎涓哄尯鍒獿ombok鑷姩鐢熸垚鐨勯粯璁ゆ瀯閫犳柟
	*  娉曘��
	*  
	*  搴旂敤绋嬪簭鍙牴鎹渶瑕佷慨鏀硅鏋勯�犳柟娉曚腑鐨勯潪绌哄睘鎬ц祴鍊笺��
	**/
	public SysDashboard(String forAutoTest){
	}

	/**
	 * @see Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("dashboardId", this.dashboardId) 
				.append("name", this.name) 
				.append("xtype", this.xtype) 
				.append("userCls", this.userCls) 
				.append("descript", this.descript) 
				.toString();
	}
	
	/**
	 * 浠ュ疄浣撶被涓婚敭鐢熸垚HASHCODE
	 */
	@Override  
	public int hashCode() {  
	    return this.dashboardId.hashCode();  
	} 	 
	
	/**
	 * 浠ュ疄浣撶被涓婚敭姣旇緝瀵硅薄鏄惁鐩哥瓑
	 */
	@Override  
	public boolean equals(Object obj) {  
	    if (obj instanceof SysDashboard) {  
	        return this.dashboardId.equals(((SysDashboard) obj).getDashboardId());  
	    }  
	    return false;  
	}	 
	
}
